package com.yanggeng.demo.beginnerguidedemo.bean.db;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.yanggeng.demo.beginnerguidedemo.bean.db.BillBean;
import com.yanggeng.demo.beginnerguidedemo.bean.db.ImageAddrBean;

import com.yanggeng.demo.beginnerguidedemo.bean.db.BillBeanDao;
import com.yanggeng.demo.beginnerguidedemo.bean.db.ImageAddrBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig billBeanDaoConfig;
    private final DaoConfig imageAddrBeanDaoConfig;

    private final BillBeanDao billBeanDao;
    private final ImageAddrBeanDao imageAddrBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        billBeanDaoConfig = daoConfigMap.get(BillBeanDao.class).clone();
        billBeanDaoConfig.initIdentityScope(type);

        imageAddrBeanDaoConfig = daoConfigMap.get(ImageAddrBeanDao.class).clone();
        imageAddrBeanDaoConfig.initIdentityScope(type);

        billBeanDao = new BillBeanDao(billBeanDaoConfig, this);
        imageAddrBeanDao = new ImageAddrBeanDao(imageAddrBeanDaoConfig, this);

        registerDao(BillBean.class, billBeanDao);
        registerDao(ImageAddrBean.class, imageAddrBeanDao);
    }
    
    public void clear() {
        billBeanDaoConfig.clearIdentityScope();
        imageAddrBeanDaoConfig.clearIdentityScope();
    }

    public BillBeanDao getBillBeanDao() {
        return billBeanDao;
    }

    public ImageAddrBeanDao getImageAddrBeanDao() {
        return imageAddrBeanDao;
    }

}
